﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace 测试题
{
    /// <summary>
    /// MainWindow.xaml 的交互逻辑
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            int score = 0;
            if (radExamOne1.IsChecked == true)
                score += 2;
            if (radExamTwo4.IsChecked == true)
                score += 2;
            if (radExamThree4.IsChecked == true)
                score += 2;
            if (radExamFour3.IsChecked == true)
                score += 2;
            if (radExamFive3.IsChecked == true)
                score += 2;
            MessageBoxResult dr = MessageBox.Show("正确答案是：A、D、D、C、C\n您的得分为：" + score + "分", "得分");//弹出消息框
            if (dr == MessageBoxResult.OK)//判断是否单击了“确实”按钮
                this.Close();
        }
    }
}
